Skip to main content

pow

Pagpapaliwanag

Kukunin niyalang ang Absolute Value ng isang number

  • also i ta-try ni js na i convert ang mga binigay na value as a number if hindi number data-type yung binigay
// 2 to the power 5 = 32
console.log(Math.pow(2, 5)); // 32

// String numbers
console.log(Math.pow('2', '5')); // 32

// 2 to the power 8 = 256
console.log(Math.pow(2, 8)); // 256

Ibang syntax para sa Math.pow()

console.log(2 ** 5); // 32

console.log(2 ** 8); // 256

Iba pang resources